* (bug 4212) Skip redundant meta-robots tag for default settings
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 8 Dec 2005 02:38:46 +0000 (02:38 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 8 Dec 2005 02:38:46 +0000 (02:38 +0000)
RELEASE-NOTES
includes/OutputPage.php

index 79c174a..55cd1b4 100644 (file)
@@ -305,6 +305,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * (bug 4207) Wrong image size when using 100x200px syntax to scale image up
   patch by David Benbennick
 * (bug 4214) Skip redundant action text inserts into the HTML <title>
+* (bug 4212) Skip redundant meta-robots tag for default settings
 
 
 === Caveats ===
index 56f0aa3..d75ba27 100644 (file)
@@ -900,9 +900,13 @@ class OutputPage {
                        }
                        $ret .= "<meta $a=\"{$tag[0]}\" content=\"{$tag[1]}\" />\n";
                }
+               
                $p = $this->mRobotpolicy;
-               if ( '' == $p ) { $p = 'index,follow'; }
-               $ret .= "<meta name=\"robots\" content=\"$p\" />\n";
+               if( $p !== '' && $p != 'index,follow' ) {
+                       // http://www.robotstxt.org/wc/meta-user.html
+                       // Only show if it's different from the default robots policy
+                       $ret .= "<meta name=\"robots\" content=\"$p\" />\n";
+               }
 
                if ( count( $this->mKeywords ) > 0 ) {
                        $strip = array(